import Vue from 'vue'
import Router from 'vue-router'
import Recommend from '../views/recommend.vue'
import Index from '../pages/index.vue'
import Rank from '../views/rank.vue'
import Search from '../views/search.vue'
import List from '../pages/list.vue'
import Play from '../pages/play.vue'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: "/index",
      component: Index,
      children: [
        {
          path: "/recommend",
          component: Recommend
        },{
          //二级路由重定向
          path:"",
          redirect:"/recommend"
        },{
          path:"/rank",
          component:Rank
        },{
          path:"/search",
          component:Search
        }
      ]
    },
    {
      path:"/list",
      component:List
    },{
      path:"/play",
      component:Play
    }

  ]
})
